#!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
@Project ：Employment_class 
@File    ：01_Foo_.py
@IDE     ：PyCharm 
@Author  ：XiaoDengYa
@Date    ：2021/7/19/019 21:22 
"""


class Foo(object):
    """"""

    def __init__(self ):
        self.dis = "测试"

    def __getattr__(self, item):
        # 当在字典中找不到时，则最后会在这个魔法方法中查找属性
        print(item, end=" ")
        return self

    def __getattribute__(self, item):
        # self.itcast = 10  # 相当于
        # self.__getattribute__("itcast")
        pass


    def __str__(self):
        return "ceshi"


# 题目
# 输出 think different itcast
# print(Foo().think.different.itcast)
print(Foo())